<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<html>
<head>
<title><s:property value="#session.titleDesc"/></title>
<%@ include file="/common/meta.jsp"%>
<SCRIPT type="text/javascript">
<!--	
	function submitValueCode(id, nameCode, ocOptionId, opValue, langId) {
		var optionValue = '#optionValue' + id;
		var ncMsg = '#resultMessage' + id;
		var subButtom = '#subButtom' + id;
		var urlpath = $("#context_path").val() + "/product/syn!modifyOptionValue.action";
		var ajaxPara = id + "#" + nameCode + "#" + ocOptionId + "#" + opValue + "#" + langId + "#" +$(optionValue).val();
		$(ncMsg).html("正在处理中……");
		$(subButtom).hide();
		$.post(urlpath, {"ajaxPara":ajaxPara},
			function(data){
				if(data == "OK"){
					$(ncMsg).html("修改成功");
			    }else{
					$(subButtom).show();
			    	$(ncMsg).html(data);
			    }
			},"text");
	}
//-->
</SCRIPT>
</head>
<body>
<%@ include file="/common/center-top.jsp"%>	
<!-- 网页主显示区，填写表单 -->
<div class="titleDiv">更新属性值名称 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	<a href="${ctp}/product/syn!toModifyOptionValueCode.action">下一步：配置统一中文属性值名称</a></div>
<input type="hidden" id="context_path" value="${ctp}"/>
<table class="tableList" cellspacing="1" cellspacing="0" cellpadding="0">
	<tr>
		<th>中文属性名称</th>
		<th>属性值</th>
		<th>语言</th>
		<th>新属性值</th>
		<th>操作</th>
	</tr>
	<s:iterator value="optionValuePage.result" var="uvar">
		<tr>
			<td>${uvar.nameCode}</td>
			<td>${uvar.optionValue}</td>
			<td>${uvar.langName}</td>
			<td><input type="text" id="optionValue${uvar.id}"/></td>
			<td>
				<span id="subButtom${uvar.id}" onclick="submitValueCode('${uvar.id}', '${uvar.nameCode}', '${uvar.ocOptionId}', '${uvar.optionValue}', '${uvar.langId}');" style="cursor: pointer;">提交</span>
				&nbsp;&nbsp;
				<span id="resultMessage${uvar.id}" style="color: red;"></span>
			</td>
		</tr>
	</s:iterator>
</table>
<cus:page pageBean="optionValuePage" action="/product/syn!toModifyOptionValue.action" cssClass="scott"></cus:page>
<%@ include file="/common/center-down.jsp"%>				
</body>
</html>